<?php echo $this->fetch('lib/head.html'); ?>
  
	<body><div id="body-wrapper"> 
		
		<div id="sidebar"><div id="sidebar-wrapper">    
			
			<?php echo $this->fetch('lib/menu.html'); ?>
			
			<div id="messages" style="display: none"> 
				
				<h3>3 Messages</h3>
			 
				<p>
					<strong>17th May 2009</strong> by Admin<br />
					Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
			 
				<p>
					<strong>2nd May 2009</strong> by Jane Doe<br />
					Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
			 
				<p>
					<strong>25th April 2009</strong> by Admin<br />
					Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
				
				<form action="" method="post">
					
					<h4>New Message</h4>
					
					<fieldset>
						<textarea class="textarea" name="textfield" cols="79" rows="5"></textarea>
					</fieldset>
					
					<fieldset>
					
						<select name="dropdown" class="small-input">
							<option value="option1">Send to...</option>
							<option value="option2">Everyone</option>
							<option value="option3">Admin</option>
							<option value="option4">Jane Doe</option>
						</select>
						
						<input class="button" type="submit" value="Send" />
						
					</fieldset>
					
				</form>
				
			</div> 
			
		</div></div> 
		
		<div id="main-content"> 
			
			<div class="clear"></div> 
			
			<div class="content-box">
				
				<?php echo $this->fetch('lib/content_head.html'); ?>
				
				<div class="content-box-content">
					
					<div class="tab-content<?php if (! $this->_var['act']): ?> default-tab<?php endif; ?>" id="tab1"> 
						
						<table>
							
							<thead>
								<tr>
								   <th><input class="check-all" type="checkbox" />ID</th>
								   <th>名称</th>
								   <th>状态</th>
								   <th>关键词</th>
								   <th>链接</th>
								   <th>操作</th>
								</tr>
								
							</thead>
						 
							<?php echo $this->fetch('lib/pages.html'); ?>
						 
							<tbody>
							<?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'd');if (count($_from)):
    foreach ($_from AS $this->_var['d']):
?>
								<tr>
									<td><input type="checkbox" value="<?php echo $this->_var['d']['type_id']; ?>" /></td>
									<td><?php echo $this->_var['d']['name']; ?></td>
									<td><?php echo $this->_var['d']['enabled']; ?></td>
									<td><?php echo $this->_var['d']['keywords']; ?></td>
									<td><?php echo $this->_var['d']['url']; ?></td>
									<td>
										
										 <a href="?app=type&act=update&id=<?php echo $this->_var['d']['type_id']; ?>" title="update"><img src="template/resources/images/icons/pencil.png" alt="update" /></a>
										 <a href="?app=type&act=delete&id=<?php echo $this->_var['d']['type_id']; ?>" title="Delete"><img src="template/resources/images/icons/cross.png" alt="Delete" /></a> 
										 <!--<a href="#" title="Edit Meta"><img src="template/resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a>-->
									</td>
								</tr>
							<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
								
							</tbody>
							
						</table>
						
					</div> 
					
					<div class="tab-content<?php if ($this->_var['act']): ?> default-tab<?php endif; ?>" id="tab2">
					
						<form action="?app=type&act=<?php echo $this->_var['act']; ?>" method="post">
							
							<fieldset> 
								
								<p>
									<label>类型名</label>
										<input class="text-input small-input" type="text" id="small-input" name="name" value="<?php echo $this->_var['row']['name']; ?>" /> <span class="input-notification success png_bg">不能为空</span> 
										<br /><small>菜品类型</small>
								</p>	
								<p>
									<label>页面标题</label>
										<input class="text-input small-input" type="text" id="small-input" name="page_title" value="<?php echo $this->_var['row']['page_title']; ?>" /> <span class="input-notification success png_bg">不能为空</span>
								</p>
								<p>
									<label>URL</label>
										<input class="text-input small-input" type="text" id="small-input" name="url" value="<?php echo $this->_var['row']['url']; ?>" /> <span class="input-notification success png_bg">不能为空</span>
								</p>
								<p>
									<label>关键词</label>
										<input class="text-input medium-input" type="text" id="medium-input" name="keywords" value="<?php echo $this->_var['row']['keywords']; ?>" /> 
										<br /><small></small>
								</p>
								
								<p>
									<label>简短描述</label>
									<input class="text-input large-input" type="text" id="large-input" name="brief" value="<?php echo $this->_var['row']['brief']; ?>" />
								</p>
								
								<p>
									<label>推荐</label>
									<input type="checkbox" name="is_best" <?php if ($this->_var['row']['is_best']): ?> checked<?php endif; ?> /> 最好类型 <input type="checkbox" name="is_hot" <?php if ($this->_var['row']['is_hot']): ?> checked<?php endif; ?> /> 最热类型
								</p>
								
								<p>
									<label>状态</label>
									<input type="radio" name="enabled" value="1" <?php if ($this->_var['row']['enabled']): ?> checked<?php endif; ?> /> 启用<br />
									<input type="radio" name="enabled" value="0" <?php if (! $this->_var['row']['enabled']): ?> checked<?php endif; ?> /> 禁止
								</p>
								
								<p>
									<label>上级类型</label>              
									<select name="parent" class="small-input">
										<option value="0">请选择..</option>
									</select> 
								</p>
								
								<!--  <p>
									<label>Textarea with WYSIWYG</label>
									<textarea class="text-input textarea wysiwyg" id="textarea" name="textfield" cols="79" rows="15"></textarea>
								</p>-->
								
								<p>
									<input type="hidden" name="id" value="<?php echo $this->_var['row']['type_id']; ?>" />
									<input class="button" name="submit" type="submit" value="提　　　　交" />
								</p>
								
							</fieldset>
							
							<div class="clear"></div>
							
						</form>
						
					</div>         
					
				</div> 
				
			</div> 
			
			<?php echo $this->fetch('lib/footer.html'); ?>
			
		</div> 
		
	</div></body>
  
</html>
